//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.shiguiwu.springboot3.enums;


import com.shiguiwu.springboot3.api.IErrorCode;

import lombok.Getter;

@Getter
public enum ApiErrorCode implements IErrorCode {
    FAILED(-1, "操作失败"),
    SUCCESS(0, "执行成功");

    private final Integer code;
    private final String msg;

    private ApiErrorCode(final Integer code, final String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static ApiErrorCode fromCode(Integer code) {
        ApiErrorCode[] ecs = values();
        ApiErrorCode[] var3 = ecs;
        int var4 = ecs.length;

        for (int var5 = 0; var5 < var4; ++var5) {
            ApiErrorCode ec = var3[var5];
            if (ec.getCode() == code) {
                return ec;
            }
        }

        return SUCCESS;
    }
}